package be.kdg.netpresentadmin;

import java.util.EventObject;

/**
* Event casted when there is a question selected in the QuestionPanel
* that needs to be handled by the QnAPannel. this event contains the
* ID of the selected question 
*
* @autor Timothy Huber, Joris Clevenbergs, Rik verschuren, Wim Van der Wilt
*/
public class QuestionSelectedEvent extends EventObject {

	private static final long serialVersionUID = 1L;
	private int iQuestionId;

	/**
	* Constructor for the QuestionSelectedEvent class.
	* 
	* @param source 	Object that casted this event.
	* @param questionId	Integer representing the id of the selected question.
	*/
	public QuestionSelectedEvent( Object source, int questionId )
	{
		super(source);
		this.iQuestionId = questionId;
	}
	
	/**
	* This method returns an integer that corresponds to the ID of the question
	* that has been selected in the QnA-Panel.  
	*/
	public int getQuestionId(){
		return this.iQuestionId;
	}
	
}